package com.houserent.controller;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.houserent.entry.HouseResult;
import com.houserent.service.AcctService;

@Controller
@RequestMapping("/acct")
public class AcctController {

    @Resource
    private AcctService acct;

    @ResponseBody
    @RequestMapping("/getAcctInfoByHouseUser.do")
    public HouseResult getAcctInfoByHouseUser(String houseId, String userId) {
        return acct.getAcctInfoByHouseUser(houseId, userId);
    }

    @ResponseBody
    @RequestMapping("/getAcct.do")
    public HouseResult getAcct(String userId, String userType, String orderByTag) {
        return acct.getAcct(userId, userType, orderByTag);
    }

    @ResponseBody
    @RequestMapping("/optAcct.do")
    public HouseResult optAcct(String acctId, String optType) {
        return acct.optAcct(acctId, optType);
    }

    @ResponseBody
    @RequestMapping("/statistics.do")
    public HouseResult statistics(String hostId) {
        return acct.statistics(hostId);
    }
}
